// Copyright (c) 2009, Tom Lokovic
// All rights reserved.
// 
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright notice,
//       this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

using Utils.Documentation;

namespace Byond.Midi
{
	/// <summary>
	/// Pitches supported by MIDI.
	/// </summary>
	/// <remarks>
	/// <para>MIDI defines 127 distinct pitches; in semitone intervals; ranging from C five octaves
	/// below middle C; up to G five octaves above middle C.  This covers several octaves above and
	/// below the range of a normal 88-key piano.</para>
	/// <para>These 127 pitches are the only ones directly expressible in MIDI. Precise
	/// variations in frequency can be achieved with Pitch Bend messages; 
	/// though Pitch Bend messages apply to the whole channel at once.</para>
	/// <para>In this enum; pitches are given C Major note names (eg "F"; "GSharp") followed
	/// by the octave number.  Octaves use standard piano terminology: Middle C is in
	/// octave 4.  (Note that this is different from "MIDI octaves"; which have Middle C in
	/// octave 0.)</para>
	/// <para>This enum has extension methods; such as
	/// <see cref="PitchExtensionMethods.NotePreferringSharps"/> and
	/// <see cref="PitchExtensionMethods.IsInMidiRange"/>; defined in
	/// <see cref="PitchExtensionMethods"/>.
	/// </para>
	/// </remarks>
	/// <seealso cref="Note"/>
	public static class Pitches
	{
		/// <summary>C in octave -1.</summary>
		[Doc]
		public static readonly Pitch CNeg1 = 0;

		/// <summary>C# in octave -1.</summary>
		[Doc]
		public static readonly Pitch CSharpNeg1 = 1;

		/// <summary>D in octave -1.</summary>
		[Doc]
		public static readonly Pitch DNeg1 = 2;

		/// <summary>D# in octave -1.</summary>
		[Doc]
		public static readonly Pitch DSharpNeg1 = 3;

		/// <summary>E in octave -1.</summary>
		[Doc]
		public static readonly Pitch ENeg1 = 4;

		/// <summary>F in octave -1.</summary>
		[Doc]
		public static readonly Pitch FNeg1 = 5;

		/// <summary>F# in octave -1.</summary>
		[Doc]
		public static readonly Pitch FSharpNeg1 = 6;

		/// <summary>G in octave -1.</summary>
		[Doc]
		public static readonly Pitch GNeg1 = 7;

		/// <summary>G# in octave -1.</summary>
		[Doc]
		public static readonly Pitch GSharpNeg1 = 8;

		/// <summary>A in octave -1.</summary>
		[Doc]
		public static readonly Pitch ANeg1 = 9;

		/// <summary>A# in octave -1.</summary>
		[Doc]
		public static readonly Pitch ASharpNeg1 = 10;

		/// <summary>B in octave -1.</summary>
		[Doc]
		public static readonly Pitch BNeg1 = 11;

		/// <summary>C in octave 0.</summary>
		[Doc]
		public static readonly Pitch C0 = 12;

		/// <summary>C# in octave 0.</summary>
		[Doc]
		public static readonly Pitch CSharp0 = 13;

		/// <summary>D in octave 0.</summary>
		[Doc]
		public static readonly Pitch D0 = 14;

		/// <summary>D# in octave 0.</summary>
		[Doc]
		public static readonly Pitch DSharp0 = 15;

		/// <summary>E in octave 0.</summary>
		[Doc]
		public static readonly Pitch E0 = 16;

		/// <summary>F in octave 0.</summary>
		[Doc]
		public static readonly Pitch F0 = 17;

		/// <summary>F# in octave 0.</summary>
		[Doc]
		public static readonly Pitch FSharp0 = 18;

		/// <summary>G in octave 0.</summary>
		[Doc]
		public static readonly Pitch G0 = 19;

		/// <summary>G# in octave 0.</summary>
		[Doc]
		public static readonly Pitch GSharp0 = 20;

		/// <summary>A in octave 0.</summary>
		[Doc]
		public static readonly Pitch A0 = 21;

		/// <summary>A# in octave 0; usually the lowest key on an 88-key keyboard.</summary>
		[Doc]
		public static readonly Pitch ASharp0 = 22;

		/// <summary>B in octave 0.</summary>
		[Doc]
		public static readonly Pitch B0 = 23;

		/// <summary>C in octave 1.</summary>
		[Doc]
		public static readonly Pitch C1 = 24;

		/// <summary>C# in octave 1.</summary>
		[Doc]
		public static readonly Pitch CSharp1 = 25;

		/// <summary>D in octave 1.</summary>
		[Doc]
		public static readonly Pitch D1 = 26;

		/// <summary>D# in octave 1.</summary>
		[Doc]
		public static readonly Pitch DSharp1 = 27;

		/// <summary>E in octave 1.</summary>
		[Doc]
		public static readonly Pitch E1 = 28;

		/// <summary>F in octave 1.</summary>
		[Doc]
		public static readonly Pitch F1 = 29;

		/// <summary>F# in octave 1.</summary>
		[Doc]
		public static readonly Pitch FSharp1 = 30;

		/// <summary>G in octave 1.</summary>
		[Doc]
		public static readonly Pitch G1 = 31;

		/// <summary>G# in octave 1.</summary>
		[Doc]
		public static readonly Pitch GSharp1 = 32;

		/// <summary>A in octave 1.</summary>
		[Doc]
		public static readonly Pitch A1 = 33;

		/// <summary>A# in octave 1.</summary>
		[Doc]
		public static readonly Pitch ASharp1 = 34;

		/// <summary>B in octave 1.</summary>
		[Doc]
		public static readonly Pitch B1 = 35;

		/// <summary>C in octave 2.</summary>
		[Doc]
		public static readonly Pitch C2 = 36;

		/// <summary>C# in octave 2.</summary>
		[Doc]
		public static readonly Pitch CSharp2 = 37;

		/// <summary>D in octave 2.</summary>
		[Doc]
		public static readonly Pitch D2 = 38;

		/// <summary>D# in octave 2.</summary>
		[Doc]
		public static readonly Pitch DSharp2 = 39;

		/// <summary>E in octave 2.</summary>
		[Doc]
		public static readonly Pitch E2 = 40;

		/// <summary>F in octave 2.</summary>
		[Doc]
		public static readonly Pitch F2 = 41;

		/// <summary>F# in octave 2.</summary>
		[Doc]
		public static readonly Pitch FSharp2 = 42;

		/// <summary>G in octave 2.</summary>
		[Doc]
		public static readonly Pitch G2 = 43;

		/// <summary>G# in octave 2.</summary>
		[Doc]
		public static readonly Pitch GSharp2 = 44;

		/// <summary>A in octave 2.</summary>
		[Doc]
		public static readonly Pitch A2 = 45;

		/// <summary>A# in octave 2.</summary>
		[Doc]
		public static readonly Pitch ASharp2 = 46;

		/// <summary>B in octave 2.</summary>
		[Doc]
		public static readonly Pitch B2 = 47;

		/// <summary>C in octave 3.</summary>
		[Doc]
		public static readonly Pitch C3 = 48;

		/// <summary>C# in octave 3.</summary>
		[Doc]
		public static readonly Pitch CSharp3 = 49;

		/// <summary>D in octave 3.</summary>
		[Doc]
		public static readonly Pitch D3 = 50;

		/// <summary>D# in octave 3.</summary>
		[Doc]
		public static readonly Pitch DSharp3 = 51;

		/// <summary>E in octave 3.</summary>
		[Doc]
		public static readonly Pitch E3 = 52;

		/// <summary>F in octave 3.</summary>
		[Doc]
		public static readonly Pitch F3 = 53;

		/// <summary>F# in octave 3.</summary>
		[Doc]
		public static readonly Pitch FSharp3 = 54;

		/// <summary>G in octave 3.</summary>
		[Doc]
		public static readonly Pitch G3 = 55;

		/// <summary>G# in octave 3.</summary>
		[Doc]
		public static readonly Pitch GSharp3 = 56;

		/// <summary>A in octave 3.</summary>
		[Doc]
		public static readonly Pitch A3 = 57;

		/// <summary>A# in octave 3.</summary>
		[Doc]
		public static readonly Pitch ASharp3 = 58;

		/// <summary>B in octave 3.</summary>
		[Doc]
		public static readonly Pitch B3 = 59;

		/// <summary>C in octave 4; also known as Middle C.</summary>
		[Doc]
		public static readonly Pitch C4 = 60;

		/// <summary>C# in octave 4.</summary>
		[Doc]
		public static readonly Pitch CSharp4 = 61;

		/// <summary>D in octave 4.</summary>
		[Doc]
		public static readonly Pitch D4 = 62;

		/// <summary>D# in octave 4.</summary>
		[Doc]
		public static readonly Pitch DSharp4 = 63;

		/// <summary>E in octave 4.</summary>
		[Doc]
		public static readonly Pitch E4 = 64;

		/// <summary>F in octave 4.</summary>
		[Doc]
		public static readonly Pitch F4 = 65;

		/// <summary>F# in octave 4.</summary>
		[Doc]
		public static readonly Pitch FSharp4 = 66;

		/// <summary>G in octave 4.</summary>
		[Doc]
		public static readonly Pitch G4 = 67;

		/// <summary>G# in octave 4.</summary>
		[Doc]
		public static readonly Pitch GSharp4 = 68;

		/// <summary>A in octave 4.</summary>
		[Doc]
		public static readonly Pitch A4 = 69;

		/// <summary>A# in octave 4.</summary>
		[Doc]
		public static readonly Pitch ASharp4 = 70;

		/// <summary>B in octave 4.</summary>
		[Doc]
		public static readonly Pitch B4 = 71;

		/// <summary>C in octave 5.</summary>
		[Doc]
		public static readonly Pitch C5 = 72;

		/// <summary>C# in octave 5.</summary>
		[Doc]
		public static readonly Pitch CSharp5 = 73;

		/// <summary>D in octave 5.</summary>
		[Doc]
		public static readonly Pitch D5 = 74;

		/// <summary>D# in octave 5.</summary>
		[Doc]
		public static readonly Pitch DSharp5 = 75;

		/// <summary>E in octave 5.</summary>
		[Doc]
		public static readonly Pitch E5 = 76;

		/// <summary>F in octave 5.</summary>
		[Doc]
		public static readonly Pitch F5 = 77;

		/// <summary>F# in octave 5.</summary>
		[Doc]
		public static readonly Pitch FSharp5 = 78;

		/// <summary>G in octave 5.</summary>
		[Doc]
		public static readonly Pitch G5 = 79;

		/// <summary>G# in octave 5.</summary>
		[Doc]
		public static readonly Pitch GSharp5 = 80;

		/// <summary>A in octave 5.</summary>
		[Doc]
		public static readonly Pitch A5 = 81;

		/// <summary>A# in octave 5.</summary>
		[Doc]
		public static readonly Pitch ASharp5 = 82;

		/// <summary>B in octave 5.</summary>
		[Doc]
		public static readonly Pitch B5 = 83;

		/// <summary>C in octave 6.</summary>
		[Doc]
		public static readonly Pitch C6 = 84;

		/// <summary>C# in octave 6.</summary>
		[Doc]
		public static readonly Pitch CSharp6 = 85;

		/// <summary>D in octave 6.</summary>
		[Doc]
		public static readonly Pitch D6 = 86;

		/// <summary>D# in octave 6.</summary>
		[Doc]
		public static readonly Pitch DSharp6 = 87;

		/// <summary>E in octave 6.</summary>
		[Doc]
		public static readonly Pitch E6 = 88;

		/// <summary>F in octave 6.</summary>
		[Doc]
		public static readonly Pitch F6 = 89;

		/// <summary>F# in octave 6.</summary>
		[Doc]
		public static readonly Pitch FSharp6 = 90;

		/// <summary>G in octave 6.</summary>
		[Doc]
		public static readonly Pitch G6 = 91;

		/// <summary>G# in octave 6.</summary>
		[Doc]
		public static readonly Pitch GSharp6 = 92;

		/// <summary>A in octave 6.</summary>
		[Doc]
		public static readonly Pitch A6 = 93;

		/// <summary>A# in octave 6.</summary>
		[Doc]
		public static readonly Pitch ASharp6 = 94;

		/// <summary>B in octave 6.</summary>
		[Doc]
		public static readonly Pitch B6 = 95;

		/// <summary>C in octave 7.</summary>
		[Doc]
		public static readonly Pitch C7 = 96;

		/// <summary>C# in octave 7.</summary>
		[Doc]
		public static readonly Pitch CSharp7 = 97;

		/// <summary>D in octave 7.</summary>
		[Doc]
		public static readonly Pitch D7 = 98;

		/// <summary>D# in octave 7.</summary>
		[Doc]
		public static readonly Pitch DSharp7 = 99;

		/// <summary>E in octave 7.</summary>
		[Doc]
		public static readonly Pitch E7 = 100;

		/// <summary>F in octave 7.</summary>
		[Doc]
		public static readonly Pitch F7 = 101;

		/// <summary>F# in octave 7.</summary>
		[Doc]
		public static readonly Pitch FSharp7 = 102;

		/// <summary>G in octave 7.</summary>
		[Doc]
		public static readonly Pitch G7 = 103;

		/// <summary>G# in octave 7.</summary>
		[Doc]
		public static readonly Pitch GSharp7 = 104;

		/// <summary>A in octave 7.</summary>
		[Doc]
		public static readonly Pitch A7 = 105;

		/// <summary>A# in octave 7.</summary>
		[Doc]
		public static readonly Pitch ASharp7 = 106;

		/// <summary>B in octave 7.</summary>
		[Doc]
		public static readonly Pitch B7 = 107;

		/// <summary>C in octave 8; usually the highest key on an 88-key keyboard.</summary>
		[Doc]
		public static readonly Pitch C8 = 108;

		/// <summary>C# in octave 8.</summary>
		[Doc]
		public static readonly Pitch CSharp8 = 109;

		/// <summary>D in octave 8.</summary>
		[Doc]
		public static readonly Pitch D8 = 110;

		/// <summary>D# in octave 8.</summary>
		[Doc]
		public static readonly Pitch DSharp8 = 111;

		/// <summary>E in octave 8.</summary>
		[Doc]
		public static readonly Pitch E8 = 112;

		/// <summary>F in octave 8.</summary>
		[Doc]
		public static readonly Pitch F8 = 113;

		/// <summary>F# in octave 8.</summary>
		[Doc]
		public static readonly Pitch FSharp8 = 114;

		/// <summary>G in octave 8.</summary>
		[Doc]
		public static readonly Pitch G8 = 115;

		/// <summary>G# in octave 8.</summary>
		[Doc]
		public static readonly Pitch GSharp8 = 116;

		/// <summary>A in octave 8.</summary>
		[Doc]
		public static readonly Pitch A8 = 117;

		/// <summary>A# in octave 8.</summary>
		[Doc]
		public static readonly Pitch ASharp8 = 118;

		/// <summary>B in octave 8.</summary>
		[Doc]
		public static readonly Pitch B8 = 119;

		/// <summary>C in octave 9.</summary>
		[Doc]
		public static readonly Pitch C9 = 120;

		/// <summary>C# in octave 9.</summary>
		[Doc]
		public static readonly Pitch CSharp9 = 121;

		/// <summary>D in octave 9.</summary>
		[Doc]
		public static readonly Pitch D9 = 122;

		/// <summary>D# in octave 9.</summary>
		[Doc]
		public static readonly Pitch DSharp9 = 123;

		/// <summary>E in octave 9.</summary>
		[Doc]
		public static readonly Pitch E9 = 124;

		/// <summary>F in octave 9.</summary>
		[Doc]
		public static readonly Pitch F9 = 125;

		/// <summary>F# in octave 9.</summary>
		[Doc]
		public static readonly Pitch FSharp9 = 126;

		/// <summary>G in octave 9.</summary>
		[Doc]
		public static readonly Pitch G9 = 127;
	}
}